@extends('layouts.back_stage')
@section('content')
    <link rel="stylesheet" href="{{env('CDN_DOMAIN_NAME')}}/css/clothInfo.css?v=1.0.2">
    <div class="container">
        <div class="lining-btn">
            <h3 style="float:left;">面辅料档案</h3>
            <a class="lining-a lining-a1" href="/admin/fabric_unit_conversion">面辅料采购单位换算</a>
            <a class="lining-a" href="/admin/ingred_data">辅料资料</a>
            <a class="lining-a" href="/admin/fabric_data">面料资料</a>
            <a class="lining-a lining-a2" href="/admin/fabric_color_define">面料色卡号定义</a>
            <a class="lining-a" href="javascript:;" style="background:#27c24c;">面辅料类型</a>
        </div>
        <ul class="lining-ul">
            {{--面辅料类型--}}
            <li id="mold" class="lining-li">
                <div class="mold-choose">
                    <a class="btn btn-danger bt_a" href="javascript:;" onclick="deltree()">删除</a>
                </div>
                <div class="oneStair">
                    {{-- 一级开始 --}}
                    <div class="oneDiv"><button type="button" class="addone" onclick="addone()">+</button></div>
                    <table class="one_stair" border="1" cellspacing="0" cellpadding="0">
                        <tr class="tr_title"><td style="width:35px;"></td><td>类型名称</td><td>备注</td></tr>
                        @if(count($cloths) > 0)
                            @foreach($cloths as $k=>$v)
                                <tr class="one_main" abc="{{ $v->id }}">
                                    {{--<td><input type="checkbox" class='gou' value="{{ $v->id }}"></td>--}}
                                    <td><input type="radio" name="radioG" class='gou' value="{{ $v->id }}"></td>
                                    <td>{{ $v->name }}</td>
                                    <td>{{ $v->remark }}</td>
                                </tr>
                            @endforeach
                        @endif
                    </table>
                </div>
                <div class="twoStair" style="display:none;">
                    {{-- 二级开始 --}}
                    <div class="twoDiv"><button type="button" class="addtwo" onclick="addtwo()">+</button></div>
                    <table class="two_stair" border="1" cellspacing="0" cellpadding="0">
                        <tr class="tr_title"><td style="width:35px;"></td><td>类型名称</td><td>备注</td></tr>
                    </table>
                </div>
                <div class="threeStair" style="display:none;">
                    {{-- 三级开始 --}}
                    <div class="threeDiv"><button type="button" class="addthree" onclick="addthree()">+</button></div>
                    <table class="three_stair" border="1" cellspacing="0" cellpadding="0">
                        <tr class="tr_title"><td style="width:35px;"></td><td>类型名称</td><td>备注</td></tr>
                    </table>
                </div>
            </li>
        </ul>
    </div>
    {{--遮罩层--}}
    <div class="mask" style="display:none;"></div>
    {{--一级面辅料类型弹出框--}}
    <div class="code_type1" style="display:none;">
        <div class="code_type_header4">
            <span>添加一级信息</span>
            <button class="code_close shut_type1">×</button>
        </div>
        <div class="code_cen">
            <lable style="float:left;margin-top:7px;">一级类型名称：</lable>
            <input class="code1" type="text" autocomplete="off" autocorrect="off" maxlength="8" placeholder="一级类型名称(必)" />
        </div>
        <div class="code_cen">
            <textarea class="code2" maxlength="15" placeholder="备注"></textarea>
        </div>
        <div class="code_bottom">
            <button class="code_btn1">确定</button>
        </div>
    </div>
    {{--二级面辅料类型弹出框--}}
    <div class="code_type2" style="display:none;">
        <div class="code_type_header5">
            <span>添加二级信息</span>
            <button class="code_close shut_type2">×</button>
        </div>
        <div class="code_cen">
            <lable style="float:left;margin-top:7px;">二级类型名称：</lable>
            <input class="txt1" type="text" autocomplete="off" autocorrect="off" maxlength="8" placeholder="二级类型名称(必)" />
        </div>
        <div class="code_cen">
            <textarea class="txt2" maxlength="15" placeholder="备注"></textarea>
        </div>
        <div class="code_bottom">
            <input type="hidden" class="txtHid" value="">
            <button class="code_btn2">确定</button>
        </div>
    </div>
    {{--三级面辅料类型弹出框--}}
    <div class="code_type3" style="display:none;">
        <div class="code_type_header6">
            <span>添加三级信息</span>
            <button class="code_close shut_type3">×</button>
        </div>
        <div class="code_cen">
            <lable style="float:left;margin-top:7px;">三级类型名称：</lable>
            <input class="info1" type="text" autocomplete="off" autocorrect="off" maxlength="8" placeholder="三级类型名称(必)" />
        </div>
        <div class="code_cen">
            <textarea class="info2" maxlength="15" placeholder="备注"></textarea>
        </div>
        <div class="code_bottom">
            <input type="hidden" class="infoHid" value="">
            <button class="code_btn3">确定</button>
        </div>
    </div>
    <script src="{{env('CDN_DOMAIN_NAME')}}/js/clothInfo.js?v=1.0.1"></script>
@endsection
